package com.cetc.sidecar.server;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;


@SpringBootApplication
@RestController
public class SideCarServerApplication {

	public static void main(String[] args) {
		SpringApplication.run(SideCarServerApplication.class, args);
	}
	
	@RequestMapping("/test")
	public String test() {
		return "welcom to cetc-sidecar-server";
	}
	@RequestMapping(value="/health", produces = "application/json;charset=UTF-8")
	public String health() {
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("status", "UP");
		return jsonObject.toString();
	}
}
